<tc_include file="Public:head" />
<div class="container" id="container">
    <div class="page">
        <div class="page__bd" style="height: 100%; overflow: hidden;">
            <div class="weui-tab">
                <div class="weui-tab__panel">
                    <header class="weui-bar-nav" style="display: none">
                        <a href="javascript:void(0)" class="icon iconfont icon-back full-left"></a>
                        <a href="javascript:void(0)" class="icon iconfont icon-share full-right"></a>
                    </header>
                    <div class="swiper-container">
                        <!--幻灯片img-->
                        <div class="swiper-wrapper">
                            <volist name="banners" id="banner">
                                <div class="swiper-slide"><a href="{$banner['banner_url']}"><img src="<php>echo '/'.C('UPLOADPATH').$banner['banner_img']</php>"></a></div>
                            </volist>
                        </div>
                        <!--幻灯片img end-->
                        <!-- Add Pagination -->
                        <div class="swiper-pagination"></div>
                    </div>
                    <!--menu-->
                    <div class="weui-flex menu">
                        <a href="{:U('Index/shop_discount')}" class="weui-flex__item">
                            <div><i class="icon iconfont icon-deals"></i>店铺优惠<span>Store Deals</span></div>
                        </a>
                        <a href="{:U('Index/activity_review')}" class="weui-flex__item">
                            <div><i class="icon iconfont icon-events"></i>往期回顾<span>Previous Overview</span></div>
                        </a>
                    </div>
                    <!--menu end-->

                    <div class="weui-panel weui-panel_access">
                        <!--newlist top-->
                        <div class="weui-panel__bd">
                            <div class="weui-flex media-box">
                                <volist name="activitys" id="activity" offset="0" length='2'>
                                    <a href="{:U('Index/activity_detail',array('id'=>$activity['id']))}" class="weui-flex__item">
                                        <div>
                                            <p><small>{$activity['activity_start_time']|strtotime|date="m.d",###}-{$activity['activity_end_time']|strtotime|date="m.d",###}</small><span>{$activity['activity_title']}</span></p>
                                            <img class="weui-media-box__thumb" src="<php>echo '/'.C('UPLOADPATH').$activity['activity_icon']</php>" alt="">
                                        </div>
                                    </a>
                                </volist>
                            </div>
                        </div>
                        <!--newlist top end-->

                        <!--newlist-->
                        <div class="weui-panel__bd">
                            <volist name="activitys" id="activity" offset="2">
                                <a href="{:U('Index/activity_detail',array('id'=>$activity['id']))}" class="weui-media-box weui-media-box_appmsg">
                                    <div class="weui-media-box__hd">
                                        <img class="weui-media-box__thumb" src="<php>echo '/'.C('UPLOADPATH').$activity['activity_icon']</php>" alt="">
                                    </div>
                                    <div class="weui-media-box__bd">
                                        <h4 class="weui-media-box__title">{$activity['activity_title']}</h4>
                                        <p class="weui-media-box__desc">{$activity['activity_intro']}</p>
                                        <p class="weui-media-box__time">活动时间：{$activity['activity_start_time']|strtotime|date="m.d",###}-{$activity['activity_end_time']|strtotime|date="m.d",###}</p>
                                    </div>
                                </a>
                            </volist>
                        </div>
                        <!--newlist end-->
                    </div>
                </div>
                <tc_include file="Public:menu" />
            </div>
        </div>
    </div>
</div>
<tc_include file="Public:footer" />
<script>
    $(".icon-back .full-left").click(function(){
        history.go(-1);
    });

    $(function(){
        var swiper = new Swiper('.swiper-container', {
            pagination: '.swiper-pagination',
            slidesPerView: 1,
            paginationClickable: true,
            spaceBetween: 0,
            loop: true,
            autoplay : 2000
        });
    });
</script>